/*
 * #%L
 * java model
 * %%
 * Copyright (C) 2009 - 2011 prefabware.com Stefan Isele
 * %%
 * All Rights Reserved.
 * This program is dual-licensed under the GNU General Public license
 * or a commercial license.
 * You may select to use one or the other of these licenses.
 * To obtain a commercial license please contact Stefan Isele at www.stefan-isele.de
 * Any modifications to this file must keep this entire header intact.
 * Redistribution, except as permitted by the selected license, is prohibited.
 * #L%
 */
package com.prefabware.jmodel.typefactory;

import com.prefabware.commons.QualifiedName;
import com.prefabware.jmodel.JType;
import com.prefabware.jmodel.JTypeDeclaration;


/**
 * to create instances of superclasses of JType
 * the {@link TypeFactory} will delegate requests to this
 * @author sisele_job
 *
 */
public interface TypeFactoryDelegee {
	public <TYPE extends JType> TYPE newJType(QualifiedName qualifiedName,JTypeDeclaration declaration, 
			@Deprecated
			JType... typeArguments);
	/**
	 * @param typeClass
	 * @param qualifiedName
	 * @return true if the factory can return a new instance of the given type
	 * the factory may decide to accept only requests for certain qualifiedNames
	 */
	public boolean acceptType(Class<? extends JType> typeClass, QualifiedName qualifiedName);
	public JTypeClassVisitor getVisitor(JType... typeArgument);
	public void initialize(TypeFactory typeFactory);
}
